﻿@model BackEnd.Models.SubscriptionModel
@{
    ViewBag.Title = "Update  subscription";
}

<h2>Update  subscription</h2>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true, "Subscription update was unsuccessful. Please correct the errors and try again.", new { @class="error_box" })
                        
    if (ViewData["ErrorMessage"] != null)
    {
    @Html.Label(ViewData["ErrorMessage"].ToString())
    }
    <div>
            @Html.HiddenFor(m => m.SubscriptionID)
            <table>
                <tr>
                    <td class="editor-label">
                        @Html.LabelFor(m => m.Code)
                    </td>
                    <td class="editor-field">
                        @Html.TextBoxFor(m => m.Code)
                        @Html.ValidationMessageFor(m => m.Code)
                    </td>
                </tr>
                <tr>
                    <td class="editor-label">
                        @Html.LabelFor(m => m.Title)
                    </td>
                    <td class="editor-field">
                        @Html.TextBoxFor(m => m.Title)
                        @Html.ValidationMessageFor(m => m.Title)
                    </td>
                </tr>
                <tr>
                    <td class="editor-label">
                        @Html.LabelFor(m => m.NumberOfDays)
                    </td>
                    <td class="editor-field">
                        @Html.TextBoxFor(m => m.NumberOfDays)
                        @Html.ValidationMessageFor(m => m.NumberOfDays)
                    </td>
                </tr>
                <tr>
                    <td class="editor-label">
                        @Html.LabelFor(m => m.Price)
                    </td>
                    <td class="editor-field">
                        @Html.TextBoxFor(m => m.Price)
                        @Html.ValidationMessageFor(m => m.Price)
                    </td>
                </tr>
                <tr>
                    <td class="editor-label">
                        @Html.LabelFor(m => m.Status)
                    </td>
                    <td class="editor-field">
                        @{
                      
    var lstStatus = ViewBag.ListStatus as System.Collections.IEnumerable; 
                            @Html.DropDownListFor(m => m.Status, new SelectList(lstStatus, "ID", "Title"), new { id = "ddlStatus" })
                            @Html.ValidationMessageFor(m => m.Status)
                        }

                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <img class="NFButtonLeft NFh" src="/Content/Img/0.png"><input type="submit" class="NFButton NFh" value="Update" /><img class="NFButtonRight NFh" src="/Content/Img/0.png"> @Html.ActionLink("Back","Index")
                    </td>
                </tr>
            </table>
        
    </div>
}
